module.exports = {
  // 数据库配置
  database: {
    host: process.env.DB_HOST || 'localhost',
    port: process.env.DB_PORT || 3306,
    user: process.env.DB_USER || 'root',
    password: process.env.DB_PASSWORD || '',
    database: process.env.DB_NAME || 'yaopin_db',
    connectionLimit: 10,
    acquireTimeout: 60000,
    timeout: 60000,
    reconnect: true
  },
  
  // 服务器配置
  server: {
    port: process.env.PORT || 3000,
    host: process.env.HOST || '0.0.0.0'
  },
  
  // JWT配置
  jwt: {
    secret: process.env.JWT_SECRET || 'your-production-jwt-secret-key',
    expiresIn: '7d'
  },
  
  // CORS配置
  cors: {
    origin: process.env.FRONTEND_URL || 'http://localhost:8080',
    credentials: true
  },
  
  // 日志配置
  logging: {
    level: 'info',
    file: './logs/app.log'
  }
}; 